using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

/// <summary>
/// 存储场景物件的ScriptableObject
/// </summary>
public class SceneInformation : ScriptableObject
{
    /// <summary>
    /// 场景的索引
    /// </summary>
    public int sceneIndex;
    /// <summary>
    /// 第一层的数组
    /// </summary>
    public List<ParentInformation> lists;
}

/// <summary>
/// 第一层
/// </summary>
[System.Serializable]
public class ParentInformation
{
    /// <summary>
    /// 父物体的实例索引
    /// </summary>
    public int parentIndex;
    /// <summary>
    /// 子物体的数组
    /// </summary>
    public List<PrefabClass> PrefabClasses;
}

/// <summary>
/// 第二层
/// 保存了该Prefab生成的Gameobject的信息
/// </summary>
[System.Serializable]
public class PrefabClass
{
    /// <summary>
    /// prefab资源
    /// </summary>
    public GameObject prefab;
    /// <summary>
    /// 实例信息的列表
    /// </summary>
    public List<GameObjectInfomation> gameobjectLists;
}

/// <summary>
/// 第三层
/// 保存该实例的信息
/// </summary>
[System.Serializable]
public class GameObjectInfomation
{
    public Vector3 position;
    public Vector3 rotation;
    public Vector3 scale;
    public int layer;
}

